; (function () {
    "use strict"
    //左上角有货更多
    const omore = document.querySelector(".more");
    const omoreMine = document.querySelector(".more-min");
    const aa = document.querySelectorAll(".more-min li a");
    omore.onmouseover = function () {
        omoreMine.style.display = "block";
        omoreMine.onmouseout = function () {
            omoreMine.style.display = "none";
        }
        omore.onmouseout = function () {
            omoreMine.style.display = "none";
        }
    }
    let aminz = ["集团官网", "男生潮流", "女生潮流", "新鲜好去处", "潮流嘉年华"];
    let aminy = ["YOHO!", "YOHO!BOYS", "YOHO!GIRLS", "Mars", "YO'HOOD"]
    for (let i = 0; i < aa.length; i++) {
        aa[i].index = i
        aa[i].onmouseover = function () {
            this.innerHTML = aminz[this.index];
            this.style.fontSize = "16px";
        }
        aa[i].onmouseout = function () {
            this.innerHTML = aminy[this.index];
            this.style.fontSize = "14px";
        }
    }
    //==============================
    //导航二级菜单
    let oFs = document.querySelector(".Fs")
    let ofs = document.querySelector(".fs")
    oFs.onmouseover = function () {
        ofs.style.display = "block";
        ofs.onmouseout = function () {
            ofs.style.display = "none";
        }
        oFs.onmouseout = function () {
            ofs.style.display = "none";
        }
    }
    let oXl = document.querySelector(".Xl")
    let oxl = document.querySelector(".xl")
    oXl.onmouseover = function () {
        oxl.style.display = "block";
        oxl.onmouseout = function () {
            oxl.style.display = "none";
        }
        oXl.onmouseout = function () {
            oxl.style.display = "none";
        }
    }
    let oBd = document.querySelector(".Bd")
    let obd = document.querySelector(".bd")
    oBd.onmouseover = function () {
        obd.style.display = "block";
        obd.onmouseout = function () {
            obd.style.display = "none";
        }
        oBd.onmouseout = function () {
            obd.style.display = "none";
        }
    }
    let oPs = document.querySelector(".Ps")
    let ops = document.querySelector(".ps")
    oPs.onmouseover = function () {
        ops.style.display = "block";
        ops.onmouseout = function () {
            ops.style.display = "none";
        }
        oPs.onmouseout = function () {
            ops.style.display = "none";
        }
    }
    // //=======================
    // //通过ajax请求商品数据库渲染到页面
    // class List {
    //     constructor() {
    //         this.goods = document.querySelector(".goods")
    //         this.url = "http://localhost:3000/data/pag1goods.json";
    //         //开启ajax
    //         this.load()

    //     }
    //     load() {
    //         ajax({
    //             url: this.url,
    //             success: (res) => {
    //                 this.res = JSON.parse(res)
    //                 this.render()
    //             }
    //         })
    //     }
    //     render() {
    //         let str = "";
    //         let id = "num="
    //         for (let i = 0; i < this.res.length; i++) {
    //             // console.log(this.res[i].id)
    //             str += `<div class="gs">
    //             <a href="../html/details.html?${this.res[i].id} "><img src="${this.res[i].img1} "alt=""></a>
    //             <p><a href="">${this.res[i].title}</a> </p >
    //             <p><a href="">${this.res[i].brand}</a> </p>
    //             <p>${this.res[i].money}</p><span>加入购物车<span>
    //         </div> `
    //         }
    //         this.goods.innerHTML = str
    //     }
    // }
    // new List
    //=============================
    //返回顶栏
    let oback = document.querySelector("#back");
    oback.onclick = function () {
        clearInterval(t)
        var t = setInterval(function () {
            var n = 100;
            if (document.documentElement.scrollTop === 0) {
                clearInterval(t)
            }
            document.documentElement.scrollTop
                -= n--
        }, 30);
    }
}());